﻿using System;
using System.IO;
using System.Web.Mvc;
using System.Web.Routing;

namespace ExtendedMvc {
	public interface IModelViewHelper<T> : IModelViewHelper where T : class {
		new IViewDataContainer<T> ViewDataContainer { get; }
		new ViewDataDictionary<T> ViewData { get; }
	}

	public interface IModelViewHelper {
		ViewContext ViewContext { get; }
		IViewDataContainer ViewDataContainer { get; }
		ViewDataDictionary ViewData { get; }
		RouteCollection RouteCollection { get; }

		ModelMetadata GetMetadataForType(Type modelType);
		ModelMetadata GetMetadataForProperty(string propertyName);

		string JavaScriptStringEncode(string message);

		void RenderPartialContent(string viewName, object viewModel, ViewDataDictionary viewData, TextWriter writer, ViewEngineCollection viewEngineCollection);
		void RenderPartialContent(string actionName, string controllerName, RouteValueDictionary routeValues, TextWriter textWriter);
		void RenderPartialContent(string routeName, string protocol, string hostName, RouteValueDictionary routeValues, TextWriter textWriter);
	}
}
